import pandas as pd
import matplotlib.pyplot as plt
df = pd.read_excel('某公司各部门1—2月份实际支出.xlsx')
x = df['部门']
height = df['1月']
plt.figure(figsize=(8,4))
plt.rcParams['font.sans-serif']='SimHei'
plt.title('某公司各部门1月份实际支出单柱形图')
plt.ylabel('实际支出(元)')
for a, b in zip(x,height):
    plt.text(a,b,'%d' % b,ha='center')
plt.bar(x,height,0.5,color='yellow')
plt.legend(('1月',))
plt.show()